<template>
    <div>
        <el-row :gutter="15">
			<el-form ref="elForm" :model="dataForm" :rules="rules" size="medium" label-width="162px" label-position="right" :disabled="setting.readonly">
				<el-col :span="12" v-if="JudgeShow('zyzmc')">
					<el-form-item label="作业证名称" prop="zyzmc" >
						<el-input v-model="dataForm.zyzmc"  :disabled ="JudgeWrite('zyzmc')"  placeholder="请输入" clearable :style='{"width":"100%"}' >
							<template slot="prepend"></template>
							<template slot="append"></template>
						</el-input>
					</el-form-item>
				</el-col>
				<el-col :span="12" v-if="JudgeShow('zyzbh')">
					<el-form-item label="作业证编号" prop="zyzbh" >
						<el-input v-model="dataForm.zyzbh"  :disabled ="JudgeWrite('zyzbh')"  placeholder="系统自动生成" readonly >
						</el-input>
					</el-form-item>
				</el-col>
				<el-col :span="12" v-if="JudgeShow('sqsw')">
					<el-form-item label="申请单位" prop="sqsw" >
						<el-select v-model="dataForm.sqsw"  :disabled ="JudgeWrite('sqsw')" @change="person" filterable placeholder="请选择" clearable :style='{"width":"100%"}' >
							<el-option v-for="(item, index) in sqswOptions" :key="index" :label="item.F_FullName" :value="item.F_Id" ></el-option>
						</el-select>
					</el-form-item>
				</el-col>
				<el-col :span="12" v-if="JudgeShow('sqr')">
					<el-form-item label="申请人" prop="sqr" >
						<!-- <el-select v-model="dataForm.sqr"  :disabled ="JudgeWrite('sqr')"  placeholder="请选择" clearable :style='{"width":"100%"}' >
							<el-option v-for="(item, index) in sqrOptions" :key="index" :label="item.F_RealName" :value="item.F_Id" ></el-option>
						</el-select> -->
						<el-select  v-model="dataForm.sqr" :disabled ="JudgeWrite('sqr')" placeholder="请选择" clearable :style='{"width":"100%"}' filterable>
							<el-option v-for="(item, index) in personAll" :key="index" :label="item.realName" :value="item.id" ></el-option>
						</el-select>
					</el-form-item>
				</el-col>
				<el-col :span="12" v-if="JudgeShow('sqrq')">
					<el-form-item label="申请日期" prop="sqrq" >
						<el-date-picker v-model="dataForm.sqrq"  :disabled ="JudgeWrite('sqrq')"  placeholder="请选择" clearable :style='{"width":"100%"}' type="date" format="yyyy-MM-dd" value-format="timestamp" >
						</el-date-picker>
					</el-form-item>
				</el-col>
				<el-col :span="12" v-if="JudgeShow('sxkjssdw')">
					<el-form-item label="受限空间所属单位" prop="sxkjssdw" >
						<el-select v-model="dataForm.sxkjssdw"  :disabled ="JudgeWrite('sxkjssdw')" filterable  placeholder="请选择" clearable :style='{"width":"100%"}' >
							<el-option v-for="(item, index) in sxkjssdwOptions" :key="index" :label="item.F_FullName" :value="item.F_Id" ></el-option>
						</el-select>
					</el-form-item>
				</el-col>
				<el-col :span="12" v-if="JudgeShow('sxkjmc')">
					<el-form-item label="受限空间名称" prop="sxkjmc" >
						<el-input v-model="dataForm.sxkjmc"  :disabled ="JudgeWrite('sxkjmc')"  placeholder="请输入" clearable :style='{"width":"100%"}' >
							<template slot="prepend"></template>
							<template slot="append"></template>
						</el-input>
					</el-form-item>
				</el-col>
				<el-col :span="12" v-if="JudgeShow('zynr')">
					<el-form-item label="作业内容" prop="zynr" >
						<el-input v-model="dataForm.zynr"  :disabled ="JudgeWrite('zynr')"  placeholder="请输入" clearable :style='{"width":"100%"}' >
							<template slot="prepend"></template>
							<template slot="append"></template>
						</el-input>
					</el-form-item>
				</el-col>
				<el-col :span="24" v-if="JudgeShow('sxkjnyyjzmc')">
					<el-form-item label="受限空间原有介质" prop="sxkjnyyjzmc" >
						<el-input v-model="dataForm.sxkjnyyjzmc"  :disabled ="JudgeWrite('sxkjnyyjzmc')"  placeholder="请输入" clearable :style='{"width":"100%"}' >
							<template slot="prepend"></template>
							<template slot="append"></template>
						</el-input>
					</el-form-item>
				</el-col>
				<el-col :span="12" v-if="JudgeShow('zykssj')">
					<el-form-item label="作业开始时间" prop="zykssj" >
						<el-date-picker v-model="dataForm.zykssj"  :disabled ="JudgeWrite('zykssj')"  placeholder="请选择" clearable :style='{"width":"100%"}' type="datetime" format="yyyy-MM-dd HH:mm:ss" value-format="timestamp" >
						</el-date-picker>
					</el-form-item>
				</el-col>
				<el-col :span="12" v-if="JudgeShow('zyjssj')">
					<el-form-item label="作业结束时间" prop="zyjssj" >
						<el-date-picker v-model="dataForm.zyjssj"  :disabled ="JudgeWrite('zyjssj')"  placeholder="请选择" clearable :style='{"width":"100%"}' type="datetime" format="yyyy-MM-dd HH:mm:ss" value-format="timestamp" >
						</el-date-picker>
					</el-form-item>
				</el-col>
				<el-col :span="12" v-if="JudgeShow('zydwfzr')">
					<el-form-item label="作业单位负责人" prop="zydwfzr" >
						<el-select v-model="dataForm.zydwfzr"  :disabled ="JudgeWrite('zydwfzr')" filterable placeholder="请选择" clearable :style='{"width":"100%"}' >
							<el-option v-for="(item, index) in zydwfzrOptions" :key="index" :label="item.F_RealName" :value="item.F_Id" ></el-option>
						</el-select>
					</el-form-item>
				</el-col>
				<el-col :span="12" v-if="JudgeShow('jhr')">
					<el-form-item label="监护人" prop="jhr" >
						<el-select v-model="dataForm.jhr"  :disabled ="JudgeWrite('jhr')" filterable placeholder="请选择" clearable :style='{"width":"100%"}' >
							<el-option v-for="(item, index) in jhrOptions" :key="index" :label="item.F_RealName" :value="item.F_Id" ></el-option>
						</el-select>
					</el-form-item>
				</el-col>
				<el-col :span="12" v-if="JudgeShow('zyr')">
					<el-form-item label="作业人" prop="zyr" >
						<el-select v-model="dataForm.zyr"  :disabled ="JudgeWrite('zyr')" filterable placeholder="请选择" clearable :style='{"width":"100%"}' >
							<el-option v-for="(item, index) in zyrOptions" :key="index" :label="item.F_RealName" :value="item.F_Id" ></el-option>
						</el-select>
					</el-form-item>
				</el-col>
				<el-col :span="12" v-if="JudgeShow('sjdqttszy')">
					<el-form-item label="涉及其他特殊作业" prop="sjdqttszy" >
						<el-input v-model="dataForm.sjdqttszy"  :disabled ="JudgeWrite('sjdqttszy')"  placeholder="请输入" clearable :style='{"width":"100%"}' >
							<template slot="prepend"></template>
							<template slot="append"></template>
						</el-input>
					</el-form-item>
				</el-col>
				<el-col :span="12" v-if="JudgeShow('whbs')">
					<el-form-item label="危害辨识" prop="whbs" >
						<el-input v-model="dataForm.whbs"  :disabled ="JudgeWrite('whbs')"  placeholder="请输入" clearable :style='{"width":"100%"}' >
							<template slot="prepend"></template>
							<template slot="append"></template>
						</el-input>
					</el-form-item>
				</el-col>
				<el-col :span="12" v-if="JudgeShow('ydyhjz')">
					<el-form-item label="有毒有害介质(分析标准)" prop="ydyhjz" >
						<el-input v-model="dataForm.ydyhjz"  :disabled ="JudgeWrite('ydyhjz')"  placeholder="请输入" clearable :style='{"width":"100%"}' >
							<template slot="prepend"></template>
							<template slot="append"></template>
						</el-input>
					</el-form-item>
				</el-col>
				<el-col :span="12" v-if="JudgeShow('krq')">
					<el-form-item label="可燃气(分析标准)" prop="krq" >
						<el-input v-model="dataForm.krq"  :disabled ="JudgeWrite('krq')"  placeholder="请输入" clearable :style='{"width":"100%"}' >
							<template slot="prepend"></template>
							<template slot="append"></template>
						</el-input>
					</el-form-item>
				</el-col>
				<el-col :span="12" v-if="JudgeShow('yhl')">
					<el-form-item label="氧含量(分析标准)" prop="yhl" >
						<el-input v-model="dataForm.yhl"  :disabled ="JudgeWrite('yhl')"  placeholder="请输入" clearable :style='{"width":"100%"}' >
							<template slot="prepend"></template>
							<template slot="append"></template>
						</el-input>
					</el-form-item>
				</el-col>
				<!-- 分析数据 -->
				<el-col :span="24">
						<el-form-item
							v-for="(list, index) in dataList.fxsj"
							:key="index"
							label="分析数据"
							prop="fxsj">
							 <el-input :disabled ="JudgeWrite('fxsj')" style="width:160px" v-model="list.ydyhjz" placeholder="请输入有毒有害介质"></el-input>
							 <el-input :disabled ="JudgeWrite('fxsj')" style="width:117px" v-model="list.krq" placeholder="请输入可燃气"></el-input>
							 <el-input :disabled ="JudgeWrite('fxsj')" style="width:120px" v-model="list.yhl" placeholder="请输入氧含量"></el-input>
							 <el-date-picker  v-model="list.sj"  :disabled ="JudgeWrite('fxsj')"  placeholder="请输入时间" clearable style="width:144px" type="date" format="yyyy-MM-dd" value-format="timestamp" >
						   </el-date-picker>
							 <el-input :disabled ="JudgeWrite('fxsj')" style="width:109px" v-model="list.bw" placeholder="请输入部位"></el-input>
							 <el-select  v-model="list.fxr" :disabled ="JudgeWrite('fxsj')" filterable placeholder="分析人" clearable style="width:110px" >
								 <el-option v-for="(item, index) in aqcsqrrOptions" :key="index" :label="item.F_RealName" :value="item.F_Id" ></el-option>
							 </el-select>
							 <el-button  @click="addDomain(list)" type="primary">新增</el-button>
							 <el-button :disabled="list.disabled" @click.prevent="removeDomain(index)">删除</el-button>
						</el-form-item>
				</el-col>
				<el-col :span="12" v-if="JudgeShow('aqcsqrr')">
					<el-form-item label="安全措施确认人" prop="aqcsqrr" >
						<el-select v-model="dataForm.aqcsqrr"  :disabled ="JudgeWrite('aqcsqrr')" filterable placeholder="请选择" clearable :style='{"width":"100%"}' >
							<el-option v-for="(item, index) in aqcsqrrOptions" :key="index" :label="item.F_RealName" :value="item.F_Id" ></el-option>
						</el-select>
					</el-form-item>
				</el-col>
				<el-col :span="12" v-if="JudgeShow('qtaqcs')">
					<el-form-item label="其他安全措施" prop="qtaqcs" >
						<el-input v-model="dataForm.qtaqcs"  :disabled ="JudgeWrite('qtaqcs')"  placeholder="请输入" clearable :style='{"width":"100%"}' >
							<template slot="prepend"></template>
							<template slot="append"></template>
						</el-input>
					</el-form-item>
				</el-col>
				<el-col :span="12" v-if="JudgeShow('bzr')">
					<el-form-item label="编制人" prop="bzr" >
						<el-select v-model="dataForm.bzr"  :disabled ="JudgeWrite('bzr')" filterable placeholder="请选择" clearable :style='{"width":"100%"}' >
							<el-option v-for="(item, index) in bzrOptions" :key="index" :label="item.F_RealName" :value="item.F_Id" ></el-option>
						</el-select>
					</el-form-item>
				</el-col>
				<el-col :span="12" v-if="JudgeShow('qrr')">
					<el-form-item label="确认人" prop="qrr" >
						<el-select v-model="dataForm.qrr"  :disabled ="JudgeWrite('qrr')" filterable placeholder="请选择" clearable :style='{"width":"100%"}' >
							<el-option v-for="(item, index) in qrrOptions" :key="index" :label="item.F_RealName" :value="item.F_Id" ></el-option>
						</el-select>
					</el-form-item>
				</el-col>
				<el-col :span="24" v-if="JudgeShow('ssaqjyr')">
					<el-form-item label="实施安全教育人" prop="ssaqjyr" >
						<el-select v-model="dataForm.ssaqjyr"  :disabled ="JudgeWrite('ssaqjyr')" filterable placeholder="请选择" clearable :style='{"width":"100%"}' >
							<el-option v-for="(item, index) in ssaqjyrOptions" :key="index" :label="item.F_RealName" :value="item.F_Id" ></el-option>
						</el-select>
					</el-form-item>
				</el-col>
				<el-col :span="24" v-if="JudgeShow('sqdwyj')">
					<el-form-item label="申请单位意见" prop="sqdwyj" >
						<el-input v-model="dataForm.sqdwyj"  :disabled ="JudgeWrite('sqdwyj')"  placeholder="请输入" show-word-limit :style='{"width":"100%"}' type="textarea" :autosize='{"minRows":4,"maxRows":4}' >
						</el-input>
					</el-form-item>
				</el-col>
				<el-col :span="12" v-if="JudgeShow('sqdwqz')">
					<el-form-item label="申请单位签字" prop="sqdwqz" >
						<el-select v-model="dataForm.sqdwqz"  :disabled ="JudgeWrite('sqdwqz')"  placeholder="请选择" clearable :style='{"width":"100%"}' >
							<el-option v-for="(item, index) in sqrOptions" :key="index" :label="item.F_RealName" :value="item.F_Id" ></el-option>
						</el-select>
					</el-form-item>
				</el-col>
				<el-col :span="12" v-if="JudgeShow('sqdwqzrq')">
					<el-form-item label="申请单位签字日期" prop="sqdwqzrq" >
						<el-date-picker v-model="dataForm.sqdwqzrq"  :disabled ="JudgeWrite('sqdwqzrq')"  placeholder="请选择" clearable :style='{"width":"100%"}' type="datetime" format="yyyy-MM-dd HH:mm:ss" value-format="timestamp" >
						</el-date-picker>
					</el-form-item>
				</el-col>
				<el-col :span="24" v-if="JudgeShow('spdwyj')">
					<el-form-item label="审批单位意见" prop="spdwyj" >
						<el-input v-model="dataForm.spdwyj"  :disabled ="JudgeWrite('spdwyj')"  placeholder="请输入" show-word-limit :style='{"width":"100%"}' type="textarea" :autosize='{"minRows":4,"maxRows":4}' >
						</el-input>
					</el-form-item>
				</el-col>
				<el-col :span="12" v-if="JudgeShow('spdwqz')">
					<el-form-item label="审批单位签字" prop="spdwqz" >
						<el-select v-model="dataForm.spdwqz"  :disabled ="JudgeWrite('spdwqz')"  placeholder="请选择" clearable :style='{"width":"100%"}' >
							<el-option v-for="(item, index) in sqrOptions" :key="index" :label="item.F_RealName" :value="item.F_Id" ></el-option>
						</el-select>
					</el-form-item>
				</el-col>
				<el-col :span="12" v-if="JudgeShow('sprq')">
					<el-form-item label="审批日期" prop="sprq" >
						<el-date-picker v-model="dataForm.sprq"  :disabled ="JudgeWrite('sprq')"  placeholder="请选择" clearable :style='{"width":"100%"}' type="datetime" format="yyyy-MM-dd HH:mm:ss" value-format="timestamp" >
						</el-date-picker>
					</el-form-item>
				</el-col>
				<el-col :span="24" v-if="JudgeShow('wgys')">
					<el-form-item label="完工验收" prop="wgys" >
						<el-input v-model="dataForm.wgys"  :disabled ="JudgeWrite('wgys')"  placeholder="请输入" show-word-limit :style='{"width":"100%"}' type="textarea" :autosize='{"minRows":4,"maxRows":4}' >
						</el-input>
					</el-form-item>
				</el-col>
				<el-col :span="12" v-if="JudgeShow('wgysqz')">
					<el-form-item label="完工验收签字" prop="wgysqz" >
						<el-select v-model="dataForm.wgysqz"  :disabled ="JudgeWrite('wgysqz')"  placeholder="请选择" clearable :style='{"width":"100%"}' >
							<el-option v-for="(item, index) in sqrOptions" :key="index" :label="item.F_RealName" :value="item.F_Id" ></el-option>
						</el-select>
					</el-form-item>
				</el-col>
				<el-col :span="12" v-if="JudgeShow('wgysrq')">
					<el-form-item label="完工验收日期" prop="wgysrq" >
						<el-date-picker v-model="dataForm.wgysrq"  :disabled ="JudgeWrite('wgysrq')"  placeholder="请选择" clearable :style='{"width":"100%"}' type="datetime" format="yyyy-MM-dd HH:mm:ss" value-format="timestamp" >
						</el-date-picker>
					</el-form-item>
				</el-col>
			</el-form>

        </el-row>
        <UserBox v-if="userBoxVisible" ref="userBox" @submit="submit" />
    </div>
</template>
<script>
    import request from '@/utils/request'
    import { previewDataInterface } from '@/api/systemData/dataInterface'
    import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
    import {departmentPerson}from '@/api/systemIntegration/recard'

    export default {
			components: {},
        props: [],
        data() {
					return {
							personAll:[], // 申请人
                visible: false,
                setting: {},
                eventType: '',
                userBoxVisible: false,
								dataList:{
									fxsj:[{
										ydyhjz:undefined,
										krq:undefined,
										yhl:undefined,
										sj:undefined,
										bw:undefined,
										fxr:undefined,
										disabled:true,
									}],
								},
								
                dataForm: {
                    id:'',                    
										flowId: '',
										actionType:1,
										freeApproverUserId: '',
										zyzmc:undefined,
										zyzbh:undefined,
										sqsw:undefined,
										sqr:undefined,
										sqrq:undefined,
										sxkjssdw:undefined,
										sxkjmc:undefined,
										zynr:undefined,
										sxkjnyyjzmc:undefined,
										zykssj:undefined,
										zyjssj:undefined,
										zydwfzr:undefined,
										jhr:undefined,
										zyr:undefined,
										sjdqttszy:undefined,
										whbs:undefined,
										ydyhjz:undefined,
										krq:undefined,
										yhl:undefined,
										aqcsqrr:undefined,
										sqdwqzrq:undefined,
										qtaqcs:undefined,
										bzr:undefined,
										qrr:undefined,
										ssaqjyr:undefined,
										wgysqz:undefined,
										sqdwyj:undefined,
										sqdwqz:undefined,
										spdwyj:undefined,
										spdwqz:undefined,
										sprq:undefined,
										wgys:undefined,
										wgysrq:undefined,
fxsj:undefined
                },
                rules: {

                },
				sqswOptions:[],
				sqrOptions:[],
				sxkjssdwOptions:[],
				zydwfzrOptions:[],
				jhrOptions:[],
				zyrOptions:[],
				aqcsqrrOptions:[],
				bzrOptions:[],
				qrrOptions:[],
				ssaqjyrOptions:[],


            }
        },
        computed: {},
        watch: {},
        created() {
		this.getsqswOptions();
		this.getsqrOptions();
		this.getsxkjssdwOptions();
		this.getzydwfzrOptions();
		this.getjhrOptions();
		this.getzyrOptions();
		this.getaqcsqrrOptions();
		this.getbzrOptions();
		this.getqrrOptions();
		this.getssaqjyrOptions();

        },
        mounted() {
					this.sxkjzyz()
				 },
        methods: {
					// 删除
					removeDomain(index) {
						this.dataList.fxsj.splice(index, 1)
					},
					// 新增
					addDomain() {
            this.dataList.fxsj.push({
							fxsj:[{
								ydyhjz:undefined,
								krq:undefined,
								yhl:undefined,
								sj:undefined,
								bw:undefined,
								fxr:undefined,
								disabled:false,
							}],
						});
					},
		getsqswOptions()
		{
			previewDataInterface('772d2cbcadd24df79243e3d92ef5f690').then(res => {
				this.sqswOptions = res.data
			})
		},
		getsqrOptions()
		{
			previewDataInterface('8bca424f16d6448ab09e57a028853aa9').then(res => {
				this.sqrOptions = res.data
			})
		},
		getsxkjssdwOptions()
		{
			previewDataInterface('772d2cbcadd24df79243e3d92ef5f690').then(res => {
				this.sxkjssdwOptions = res.data
			})
		},
		getzydwfzrOptions()
		{
			previewDataInterface('8bca424f16d6448ab09e57a028853aa9').then(res => {
				this.zydwfzrOptions = res.data
			})
		},
		getjhrOptions()
		{
			previewDataInterface('8bca424f16d6448ab09e57a028853aa9').then(res => {
				this.jhrOptions = res.data
			})
		},
		getzyrOptions()
		{
			previewDataInterface('8bca424f16d6448ab09e57a028853aa9').then(res => {
				this.zyrOptions = res.data
			})
		},
		getaqcsqrrOptions()
		{
			previewDataInterface('8bca424f16d6448ab09e57a028853aa9').then(res => {
				this.aqcsqrrOptions = res.data
			})
		},
		getbzrOptions()
		{
			previewDataInterface('8bca424f16d6448ab09e57a028853aa9').then(res => {
				this.bzrOptions = res.data
			})
		},
		getqrrOptions()
		{
			previewDataInterface('8bca424f16d6448ab09e57a028853aa9').then(res => {
				this.qrrOptions = res.data
			})
		},
		getssaqjyrOptions()
		{
			previewDataInterface('8bca424f16d6448ab09e57a028853aa9').then(res => {
				this.ssaqjyrOptions = res.data
			})
		},

            goBack() {
                this.$emit('refresh')
            },
						// 申请人
						async person(id) {
							this.dataForm.sqr = ''
							const {data} = await departmentPerson({organizeId:id})
							this.personAll = data.list
						},
						fullName(val,id) {
							this.person(id)
							this.val = val
							this.dataForm.sqsw = val
						},
						sxkjzyz() {
							let fullName = this.$store.getters.itemData.fullName
							// 申请单位
							switch (fullName) {
                case '禄口油库受限空间作业证':
                  return this.fullName('禄口油库','0e7420aab60f4d1d9297be06258760e9')
								break;
								case '航空加油站受限空间作业证':
									return this.fullName('航空加油站','aa579f18def44c298497c7a9727fcf76')
								break;
								case '管道中心受限空间作业证':
									return this.fullName('管道中心','0f3b5731aa2f4542a0b143e858c59b66')
								break;
								case '机坪车辆加油站受限空间作业证':
									return this.fullName('机坪车辆加油站','3094a0f6f74d470e9b95dcc406bfcb0f')
								break;
							}
						},
            init(data) {
                this.loading = true
                this.dataForm.id = data.id || ''
                this.setting = data
                this.visible = true;
                this.$nextTick(() => {
                    this.$refs['elForm'].resetFields();
                    if (this.dataForm.id) {
                        request({
                            url: '/api/WorkFlowForm/qyaqscSxkjzyxx/' + this.dataForm.id,
                            method: 'get'
                        }).then(res => {						
                            this.dataForm = res.data
														this.dataList.fxsj = this.dataForm.fxsj ? JSON.parse(this.dataForm.fxsj) : [];
														this.dataForm.sqsw = this.val
                        })
                    } else {
                        this.dataForm.flowId = data.flowId
												this.dataForm.sqsw = this.val
                    }
                    this.loading = false
                })
            },
            // 表单提交
            dataFormSubmit(eventType) {            
                this.$refs['elForm'].validate((valid) => {
                    if (valid) {
                        if (eventType === 'audit' || eventType === 'reject') {
                            this.$emit('approval', this.dataForm, eventType)
                            return
                         }
                        this.dataForm.actionType = eventType === 'submit' ? 0 : 1
                        this.eventType = eventType
                        if (this.eventType === 'submit') {
                            if (this.setting.freeApprover == 0) {
                                this.$confirm('您确定要提交当前流程吗, 是否继续?', '提示', {
                                    type: 'warning'
                                }).then(() => {
                                    this.submit()
                                }).catch(() => { });
                            } else {
                                this.userBoxVisible = true
                                this.$nextTick(() => {
                                    this.$refs.userBox.init()
                                })
                            }
                        } else {
                            this.request()
                        }
                    }
                })
            },
            submit(freeApproverUserId) {
                if (freeApproverUserId) this.dataForm.freeApproverUserId = freeApproverUserId
                this.request()
            },
            request() {
                if (!this.dataForm.id) {
                    delete (this.dataForm.id)
										this.$set(this.dataForm, 'fxsj', JSON.stringify(this.dataList.fxsj));
										let quest = {...this.dataForm}
                    request({
                        url: '/api/WorkFlowForm/qyaqscSxkjzyxx',
                        method: 'post',
                        data: quest
                    }).then((res) => {
                        this.$message({
                            message: res.msg,
                            type: 'success',
                            duration: 1000,
                            onClose: () => {
                                this.visible = false
                                this.$emit('close', true)
                            }
                        })
                    })
                } else {
                    request({
                        url: '/api/WorkFlowForm/qyaqscSxkjzyxx/' + this.dataForm.id,
                        method: 'PUT',
                        data: this.dataForm
                    }).then((res) => {
                        this.$message({
                            message: res.msg,
                            type: 'success',
                            duration: 1000,
                            onClose: () => {
                                this.visible = false
                                this.$emit('close', true)
                            }
                        })
                    })
                }
            },
            JudgeShow(id) {
                if (!this.setting.formOperates || !this.setting.formOperates.length) return true
                let arr = this.setting.formOperates.filter(o => o.id === id) || []
                if (!arr.length) return true
                let item = arr[0]
                return item.read
            },
            JudgeWrite(id) {
                if (!this.setting.formOperates || !this.setting.formOperates.length) return false
                let arr = this.setting.formOperates.filter(o => o.id === id) || []
                if (!arr.length) return true
                let item = arr[0]
                return !item.write
            },

        },
    }

</script>
